<!DOCTYPE html>
<%@page import="org.codehaus.groovy.grails.commons.GrailsApplication"%>
<html>
	<head>
		<meta name="layout" content="main"/>
		<title>Login</title>
		
		<style type="text/css">
			#btnLogin { background-color: #080; border: 1px solid #070; color: #fff; margin-left: 40%; padding: 5px 10px; }
		</style>
	</head>
	<body>
		<a href="#create-funcionario" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
			</ul>
		</div>
		
		<div id="create-funcionario" class="content scaffold-list" role="main">
			<h1>Login</h1>
			<g:if test="${flash.message}">
				<div class="message" role="status">${flash.message}</div>
			</g:if>
			<g:hasErrors bean="${funcionarioInstance}">
			<ul class="errors" role="alert">
				<g:eachError bean="${funcionarioInstance}" var="error">
				<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
				</g:eachError>
			</ul>
			</g:hasErrors>
			<g:form action="handleLogin" >
	           <fieldset class="form">
	               <div class="fieldcontain ${hasErrors(bean: funcionarioInstance, field: 'login', 'error')} ">
	                   <label for="funcionario">
	                       <g:message code="funcionario.login.label" default="Login" />
	                   </label>
	                   <g:textField name="user" value="${funcionarioInstance?.login}"/>
	               </div>
	               
	               <div class="fieldcontain ${hasErrors(bean: funcionarioInstance, field: 'senha', 'error')} ">
	                   <label for="senha">
	                       <g:message code="funcionario.senha.label" default="Senha" />
	                   </label>
	                   <g:field type="password" name="senha" value="${funcionarioInstance?.senha}"/>
	               </div>
					
					<br />
					
					<button type="submit" id="btnLogin" name="login" class="save">
						Login
					</button>
	           </fieldset>
	       </g:form>
       </div>
	</body>
</html>